<script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/jquery/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/js/user/index.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        var status = '<? echo $pagevals['status']; ?>';
        $('#status').val(status);
        
        var gender = '<? echo $pagevals['gender']; ?>';
        $('#gender').val(gender);
        
        var age = '<? echo $pagevals['age']; ?>';
        $('#age').val(age);
        
        var type = '<? echo $pagevals['type']; ?>';
        $('#type').val(type);
        
        var group = '<? echo $pagevals['group']; ?>';
        $('#group').val(group);
        
        $('#search_box').keyup(function(e){
            var search_string =  $('#search_box').val();
            action = "?r=user/index&status="+status+"&gender="+gender+"&group="+group+"&age="+age+"&type="+type+"&search_string="+search_string;
            if(e.keyCode == 13){
              window.location = action;
            }
        });
        
        $("#status").change(function(){
            var filter_laber_status = $("#status").val();
            action = "?r=user/index&status="+filter_laber_status+"&gender="+gender+"&age="+age+"&type="+type+"&group="+group;
            window.location = action;
         });
         
         $("#gender").change(function(){
            var filter_laber_gender = $("#gender").val();
            action = "?r=user/index&status="+status+"&gender="+filter_laber_gender+"&age="+age+"&type="+type+"&group="+group;
            window.location = action;
         });
         
         
         $("#type").change(function(){
            var filter_laber_type = $("#type").val();
            action = "?r=user/index&status="+status+"&gender="+gender+"&age="+age+"&type="+filter_laber_type+"&group="+group;
            window.location = action;
         });
         
         $("#group").change(function(){
            var filter_laber_group = $("#group").val();
            action = "?r=user/index&status="+status+"&gender="+gender+"&age="+age+"&type="+type+"&group="+filter_laber_group;
            window.location = action;
         });
         
         $("#age").change(function(){
            var filter_laber_age = $("#age").val();
            action = "?r=user/index&status="+status+"&gender="+gender+"&age="+filter_laber_age+"&type="+type+"&group="+group;
            window.location = action;
         });
         
         $(".create_new").click(function(){
            window.location='?r=user/create';
        });

       
    });
</script>

<div style="float: left;">
   <button class="btn create_new" href="#"><span class="icon16 cut-icon-plus"></span> Add</button>
   <?php
        $btn_waiting='<button class="btn waiting_checked" style="margin-right: 3px" href="#"><span class="icon16 entypo-icon-time"></span> Waiting</button>';
        $btn_banned='<button class="btn banned_checked" style="margin-right: 3px" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
        $btn_actived='<button class="btn active_checked" style="margin-right: 3px" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
        $btn_locked='<button class="btn locked_checked" style="margin-right: 3px" href="#"><span class="icon16 icomoon-icon-locked"></span> Locked</button>';
        $btn_restore='<button class="btn restore_checked" style="margin-right: 3px" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        //$btn_remove='<button class="btn remove_checked" style="margin-right: 3px" href="#"><span class="icon16 icomoon-icon-remove-2"></span> Delete</button>';
        
         if($pagevals['status'] == 'waiting'){
            //$user_actived ='<a href="#" style="display:none;float:left" title="Active" id="'.$user['id'].'" class="actived"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
            //$btn_locked='<button class="btn locked_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-locked"></span> locked</button>';
            $btn_waiting='<button class="btn waiting_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Waiting</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
         }
         if($pagevals['status'] == 'banned'){
            //$btn_locked='<button class="btn locked_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-locked"></span> locked</button>';
            $btn_banned='<button class="btn banned_checked" style="display:none" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        }
         if($pagevals['status'] == 'actived'){
            //$btn_banned='<button class="btn banned_checked" style="display:none" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
            $btn_actived='<button class="btn active_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        }
         if($pagevals['status'] == 'locked'){
            $btn_waiting='<button class="btn waiting_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Waiting</button>';
            $btn_banned='<button class="btn banned_checked" style="display:none" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
            $btn_locked='<button class="btn locked_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-locked"></span> locked</button>';
            //$btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
         }
         /*
         if($pagevals['status'] == 'deleted'){
             
            $btn_waiting='<button class="btn waiting_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Waiting</button>';
            $btn_banned='<button class="btn banned_checked" style="display:none" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
            $btn_actived='<button class="btn active_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
            $btn_locked='<button class="btn locked_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-locked"></span> locked</button>';
            $btn_remove='<button class="btn remove_checked" style="display:none"  href="#"><span class="icon16 icomoon-icon-remove-2"></span> Delete</button>';
        }
          * 
          */
        $control_button = $btn_waiting.$btn_banned.$btn_actived.$btn_locked.$btn_restore;
        echo $control_button;
   ?>
</div>

<div class="pagination" style="float: right; ">
  <ul>
      <li><span class=""><b><? echo $pagevals['row_start'] ?></b>-<b><? echo $pagevals['row_end'] ?></b> of <b><? echo $pagevals['total_row'] ?></b></span></li>
     <? if($pagevals['page_number'] != 1 && $pagevals['total_row'] != 0){ 
         $prev_page = $pagevals['page_number']-1;
         echo '<li><a href="?r=user/index&page_number='.$prev_page.'&status='.$pagevals['status'].'&search_string='.$pagevals['search_string'].'&gender='.$pagevals['gender'].'&position='.$pagevals['position'].'&type='.$pagevals['type'].'&age'.$pagevals['age'].'&group='.$pagevals['group'].'"><span class="icon12 minia-icon-arrow-left-3"></span></a></li>'; 
        }?>
    <? if($pagevals['page_number'] != $pagevals['total_page'] && $pagevals['total_row'] !=0 ) {
        $next_page = $pagevals['page_number']+1;
        echo '<li><a href="?r=user/index&page_number='.$next_page.'&status='.$pagevals['status'].'&search_string='.$pagevals['search_string'].'&gender='.$pagevals['gender'].'&position='.$pagevals['position'].'&type='.$pagevals['type'].'&age'.$pagevals['age'].'&group='.$pagevals['group'].'"><span class="icon12 minia-icon-arrow-right-3"></span></a></li>'; 
        }?>
      
  </ul>
</div>
<div style="clear: both"></div>

<style type="">
    .filter-wrapper {
        margin-right: 7px;
        float: left;
        margin-bottom: 5px;
    }
    
    .filter-label {
        padding-left: 10px;
    }
    
</style>

<div class="row-fluid">

    <div class="span69">

        <div class="box">

            <div class="title">

                <h4 class="left">
                    <!--span class="icon16 brocco-icon-grid"></span--> 
                    <div class="filter-wrapper">
                        <label class="filter-label">Trạng thái</label>
                        <select id="status" name="status" style="opacity: 0;">
                            <option class="filter_label" value="waiting">Waiting</option>
                            <option class="filter_label" value="actived">Actived</option>
                            <option class="filter_label" value="banned">Banned</option>
                            <option class="filter_label" value="locked">Locked</option>
                            <option class="filter_label" value="all">All</option>
                        </select>
                    </div>
                    <div class="filter-wrapper">
                        <label class="filter-label">Nhóm</label>
                        <select name="group" id="group" style="opacity: 0;">
                            <option class="filter_label" value="all">All</option>
                            <option  value="2">Senior Member</option>
                            <option  value="0">Junior Member</option>
                            <option  value="1">Nomal Member</option>
                        </select>
                    </div>    
                    <div class="filter-wrapper">
                        <label class="filter-label">Độ tuổi</label>
                        <select id="age" name="age" style="opacity: 0;">
                           <option class="filter_label" value="all">All</option>
                           <option class="filter_label" value="1">Dưới 13 tuổi</option>
                           <option class="filter_label" value="2">Từ 13 - 15 tuổi</option>
                           <option class="filter_label" value="3">Từ 15 -18 tuổi</option>
                           <option class="filter_label" value="4">Từ 18 - 23 tuổi</option>
                           <option class="filter_label" value="5">Trên 23 tuổi</option>
                       </select>
                    </div>
                    
                    <div class="filter-wrapper">
                        <label class="filter-label">Giới tính</label>
                        <select id="gender" name="gender" style="opacity: 0;">
                           <option class="filter_label" value="all">All</option>
                           <option class="filter_label" value="1">Nam</option>
                           <option class="filter_label" value="0">Nữ</option>
                       </select>
                    </div>
                    
                    <div class="filter-wrapper">
                        <label class="filter-label">Người dùng</label>
                        <select name="type" id="type" style="opacity: 0;">
                            <option class="filter_label" value="all">All</option>
                            <option value="nomal">Nomal Account</option>
                            <option value="facebook">Facebook Account</option>
                            <option value="google">Google Account</option>
                        </select><br /><br />
                    </div>
                     
                    <input type="text" id="search_box" name="search_string" value="" class="" placeholder="<? if($pagevals['search_string'] != '') echo $pagevals['search_string']; else echo 'Search here ...'?>" style=" width: 380px; padding: 5px;">
                    
                    
                    
                    <span style="clear: left"></span>    
                    </h4>
                
                <a href="#" class="minimize" style="display: none;">Minimize</a>
                <div class="clearfix"></div>
            </div>
            
            <div class="content noPad">
                <table class="responsive table table-bordered" id="checkAll">
                    <thead>
                      <tr>
                        <th id="masterCh" class="ch">
                            <div class="checker" id="uniform-undefined">
                                <span><input type="checkbox" name="checkbox" value="all" class="styled" style="opacity: 0;"></span>
                            </div>
                        </th>
                        <th>Username</th>
                        <th>Email</th>
                        <th>Họ tên</th>
                        <th>Ngày sinh</th>
                        <th>Giới tính</th>
                        <th>Số điện thoại</th>
                        <th>Nhóm người dùng</th>
                        <th>Facebook ID</th>
                        <th>Google ID</th>
                        <th>Xử lý</th>
                      </tr>
                    </thead>
                    <tbody>
                        <?php
                          if(count($data)==0 || $data==null){
                              echo '<h3><label>Không có kết quả nào được tìm thấy.</label></h3>';
                          }else{  
                            $_tr = "</tr>";
                            $td_ = "<td style=vertical-align:middle>";$_td = "</td>";

                            $userlist = "";
                            foreach ($data as $user) {
                                if($user["gender"] == 1)$user["gender"]='Nam';
                                else $user["gender"]='Nữ';
                                if($user["group"]== 0)$user["group"]='Junior Member';
                                if($user["group"]== 1)$user["group"]='Nomal Member';
                                if($user["group"]== 2)$user["group"]='Senior Member';
                                if($user['banned_date']==null)$user_banned = '-- --';
                                else{$user_banned=date('H',$user["banned_date"]).'H '.date('i',$user["banned_date"]).'P '.date('d',$user["banned_date"]).'/'.date('m',$user["banned_date"]).'/'.date('Y',$user["banned_date"]);}
                                if($user['lifted_date']==null)$user_lifted = '-- --';
                                else{$user_lifted=date('H',$user["lifted_date"]).'H '.date('i',$user["lifted_date"]).'P '.date('d',$user["lifted_date"]).'/'.date('m',$user["lifted_date"]).'/'.date('Y',$user["lifted_date"]);}
                               $userlist .='<tr id="row'.$user['id'].'"><td class="chChildren"><input type="checkbox" id="checkbox" value="'.$user['id'].'" class="styled" /></td>'; 
                               $userlist .= $td_.$user["username"].$_td;
                               $userlist .= $td_.$user["email"].$_td;
                               $userlist .= $td_.$user["fullname"].$_td;
                               $userlist .= $td_.date('d',$user["birthday"]).'/'.date('m',$user["birthday"]).'/'.date('Y',$user["birthday"]).$_td;
                               $userlist .= $td_.$user["gender"].$_td;
                               $userlist .= $td_.$user["phone"].$_td;
                               $userlist .= $td_.$user["group"].$_td;
         
                               //$userlist .= $td_.$user["address"].$_td;
                               $userlist .= $td_.$user["facebook_id"].$_td;
                               $userlist .= $td_.$user["google_id"].$_td;
                               //$userlist .= $td_.$user_banned.$_td;
                              // $userlist .= $td_.$user_lifted.$_td;
                               $userlist .= '<td id="td'.$user['id'].'" width="90" style="vertical-align:middle"><div class="controls center">';
                               
                               $user_waiting ='<a href="#" title="Waiting" id="'.$user['id'].'" style="display:locked;float:left" class="waiting"><span class="icon12 entypo-icon-time"></span></a>';
                               $user_banned ='<a href="#" title="BAN" id="'.$user['id'].'" style="display:locked;float:left" class="banned"><span class="icon12  entypo-icon-blocked "></span></a>';
                               $user_actived ='<a href="#" title="Active" id="'.$user['id'].'" style="display:locked;float:left" class="actived"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
                               $user_locked ='<a href="#" title="Locked" id="'.$user['id'].'" style="display:locked;float:left" class="locked"><span class="icon12 icomoon-icon-locked"></span></a>';   
                               $user_edit = '<a href="?r=user/edit&id='.$user['id'].'" style="display:locked;float:left" title="Edit"><span class="icon12 icomoon-icon-pencil"></span></a>';
                               $user_restore ='<a href="#" title="Restore" id="'.$user['id'].'" style="display:locked;float:left" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               //$user_remove ='<a href="#" id="'.$user['id'].'" style="display:locked;float:left" class="remove" title="Remove" ><span class="icon12 icomoon-icon-remove"></span></a></div></td>'.$_tr;
                               
                               if($user['status'] == 'waiting'){
                                  //$user_actived ='<a href="#" style="display:none;float:left" title="Active" id="'.$user['id'].'" class="actived"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
                                  //$user_locked ='<a href="#" style="display:none;float:left" title="locked" id="'.$user['id'].'" class="locked"><span class="icon12 icomoon-icon-locked"></span></a>';   
                                  $user_waiting ='<a href="#" style="display:none;float:left" title="Waiting" id="'.$user['id'].'" class="waiting"><span class="icon12 entypo-icon-time"></span></a>';
                                  $user_restore ='<a href="#" style="display:none;float:left" title="Restore" id="'.$user['id'].'" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               }
                               if($user['status'] == 'banned'){
                                  //$user_locked ='<a href="#" style="display:none;float:left" title="locked" id="'.$user['id'].'" class="locked"><span class="icon12 icomoon-icon-locked"></span></a>';
                                  $user_banned ='<a href="#" style="display:none;float:left" title="BAN" id="'.$user['id'].'" class="banned"><span class="icon12  entypo-icon-blocked "></span></a>';
                                  $user_restore ='<a href="#" style="display:none;float:left" title="Restore" id="'.$user['id'].'" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               }
                               if($user['status'] == 'actived'){
                                   //$user_waiting ='<a href="#" style="display:none;float:left" title="Waiting" id="'.$user['id'].'" class="waiting"><span class="icon12 entypo-icon-time"></span></a>';
                                   //$user_banned ='<a href="#" style="display:none;float:left" title="BAN" id="'.$user['id'].'" class="banned"><span class="icon12  entypo-icon-blocked "></span></a>';
                                   $user_actived ='<a href="#" style="display:none;float:left" title="Active" id="'.$user['id'].'" class="actived"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
                                   $user_restore ='<a href="#" style="display:none;float:left" title="Restore" id="'.$user['id'].'" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               }
                               if($user['status'] == 'locked'){
                                  $user_waiting ='<a href="#" style="display:none;float:left" title="Waiting" id="'.$user['id'].'" class="waiting"><span class="icon12 entypo-icon-time"></span></a>';
                                  $user_banned ='<a href="#" style="display:none;float:left" title="BAN" id="'.$user['id'].'" class="banned"><span class="icon12  entypo-icon-blocked "></span></a>';
                                  $user_locked ='<a href="#" style="display:none;float:left" title="Locked" id="'.$user['id'].'" class="locked"><span class="icon12 icomoon-icon-locked"></span></a>';
                                  $user_edit = '<a href="?r=user/edit&id='.$user['id'].'" style="display:none;float:left" title="Edit"><span class="icon12 icomoon-icon-pencil"></span></a>';
                                  $user_actived ='<a href="#" style="display:none;float:left" title="Active" id="'.$user['id'].'" class="actived"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
                                    
                                    //$user_restore ='<a href="#" style="display:none;float:left" title="Restore" id="'.$user['id'].'" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               }
                               
                               /*
                               if($user['status'] == 'deleted'){
                                   //$user_edit = '<a href="?r=user/edit&id='.$user['id'].'" style="display:none;float:left" title="Edit"><span class="icon12 icomoon-icon-pencil"></span></a>';
                                   $user_waiting ='<a href="#" style="display:none;float:left"  title="Waiting" id="'.$user['id'].'" class="waiting"><span class="icon12 entypo-icon-time"></span></a>';
                                   $user_banned ='<a href="#" style="display:none;float:left"  title="BAN" id="'.$user['id'].'" class="banned"><span class="icon12  entypo-icon-blocked "></span></a>';
                                   $user_actived ='<a href="#" style="display:none;float:left"  title="Active" id="'.$user['id'].'" class="actived"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
                                   $user_locked ='<a href="#" style="display:none;float:left"  title="locked" id="'.$user['id'].'" class="locked"><span class="icon12 icomoon-icon-locked"></span></a>';   
                                   $user_remove ='<a href="#" style="display:none;float:left" id="'.$user['id'].'" class="remove" title="Remove" ><span class="icon12 icomoon-icon-remove"></span></a></div></td>'.$_tr;
                               }
                                * 
                                */
                               $userlist .= $user_waiting.$user_actived.$user_banned.$user_locked.$user_restore.$user_edit;
                            }
                             $userlist .= $_tr;
                             echo $userlist;
                             
                          }
                        ?>
                                      
                    </tbody>
                </table>
            </div>

        </div><!-- End .box -->

    </div><!-- End .span6 -->

</div>


<div style="float: left;">
   <button class="btn create_new" href="#"><span class="icon16 cut-icon-plus"></span> Add</button>
   <?php
   /*
        $btn_waiting='<button class="btn waiting_checked" style="" href="#"><span class="icon16 entypo-icon-time"></span> Waiting</button>';
        $btn_banned='<button class="btn banned_checked" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
        $btn_actived='<button class="btn active_checked" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
        $btn_locked='<button class="btn locked_checked" href="#"><span class="icon16 icomoon-icon-locked"></span> locked</button>';
        $btn_restore='<button class="btn restore_checked" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        $btn_remove='<button class="btn remove_checked" href="#"><span class="icon16 icomoon-icon-remove-2"></span> Delete</button>';
   */     
         if($pagevals['status'] == 'waiting'){
            //$user_actived ='<a href="#" style="display:none;float:left" title="Active" id="'.$user['id'].'" class="actived"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
            //$btn_locked='<button class="btn locked_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-locked"></span> locked</button>';
            $btn_waiting='<button class="btn waiting_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Waiting</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
         }
         if($pagevals['status'] == 'banned'){
            //$btn_locked='<button class="btn locked_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-locked"></span> locked</button>';
            $btn_banned='<button class="btn banned_checked" style="display:none" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        }
         if($pagevals['status'] == 'actived'){
            //$btn_banned='<button class="btn banned_checked" style="display:none" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
            $btn_actived='<button class="btn active_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        }
         if($pagevals['status'] == 'locked'){
            $btn_waiting='<button class="btn waiting_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Waiting</button>';
            $btn_banned='<button class="btn banned_checked" style="display:none" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
            $btn_locked='<button class="btn locked_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-locked"></span> locked</button>';
            //$btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
         }
         /*
         if($pagevals['status'] == 'deleted'){
             
            $btn_waiting='<button class="btn waiting_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Waiting</button>';
            $btn_banned='<button class="btn banned_checked" style="display:none" href="#"><span class="icon16 entypo-icon-blocked "></span> BAN</button>';
            $btn_actived='<button class="btn active_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
            $btn_locked='<button class="btn locked_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-locked"></span> locked</button>';
            $btn_remove='<button class="btn remove_checked" style="display:none"  href="#"><span class="icon16 icomoon-icon-remove-2"></span> Delete</button>';
        }
          * 
          */
        $control_button = $btn_waiting.$btn_banned.$btn_actived.$btn_locked.$btn_restore;
        echo $control_button;
   ?>
</div>

<div class="pagination" style="float: right; ">
  <ul>
      <li><span class=""><b><? echo $pagevals['row_start'] ?></b>-<b><? echo $pagevals['row_end'] ?></b> of <b><? echo $pagevals['total_row'] ?></b></span></li>
    <? if($pagevals['page_number'] != 1 && $pagevals['total_row'] != 0){ 
         $prev_page = $pagevals['page_number']-1;
         echo '<li><a href="?r=user/index&page_number='.$prev_page.'&status='.$pagevals['status'].'&search_string='.$pagevals['search_string'].'&gender='.$pagevals['gender'].'&position='.$pagevals['position'].'&type='.$pagevals['type'].'&age'.$pagevals['age'].'&group='.$pagevals['group'].'"><span class="icon12 minia-icon-arrow-left-3"></span></a></li>'; 
        }?>
    <? if($pagevals['page_number'] != $pagevals['total_page'] && $pagevals['total_row'] !=0 ) {
        $next_page = $pagevals['page_number']+1;
        echo '<li><a href="?r=user/index&page_number='.$next_page.'&status='.$pagevals['status'].'&search_string='.$pagevals['search_string'].'&gender='.$pagevals['gender'].'&position='.$pagevals['position'].'&type='.$pagevals['type'].'&age'.$pagevals['age'].'&group='.$pagevals['group'].'"><span class="icon12 minia-icon-arrow-right-3"></span></a></li>'; 
        }?>
  </ul>
</div>
<div style="clear: both"></div>
